<?php
/**
 * The framework configuration file.
 * @package HoK
 * @subpackage Config
 * @author Greg McWhirter <gsm4@pitt.edu>
 * @copyright Copyright &copy; 2006, Greg McWhirter
 * @version $Revision: 25M $
 */

//define("DEBUG", KVF_LOG_LDEBUG);
define("DEBUG", KVF_LOG_LINFO);

/**
 * The main configuration class
 *
 * @package HoK
 * @subpackage Config
 */
abstract class CONFIG
{
  /**
   * Whether to use the db handler or not
   *
   */
  const USE_DBHANDLER = true;
  /**
   * Whether to use the log handler or not
   *
   */
  const USE_LOGHANDLER = true;
  /**
   * Whether to use the mail handler or not
   *
   */
  const USE_MAILHANDLER = true;
  /**
   * Whether to use the cacher or not
   *
   */
  const USE_CACHE = false;
  /**
   * Whether to use a layout or not
   *
   */
  const USE_LAYOUT = true;
  /**
   * The name of the default layout
   *
   */
  const DEFAULT_LAYOUT = "default";

  //non-framework

  /**
   * The base uri for the site
   */
  const BASEURI = "/scheduler";
  /**
   * The root url for the site
   *
   */
  const ROOTURL = "http://www.hallofkvasir.org/scheduler";
  /**
   * The domain for the site
   *
   */
  const DOMAIN = "hallofkvasir.org";
  /**
   * The name to use for cookies
   *
   */
  const COOKIENAME = "KvSchedulerLogin";

  /**
   * The domain to use for cookies
   */
  const COOKIE_DOMAIN = ".hallofkvasir.org";

  /**
   * The email for the framework to use on the exception page
   */
  const ADMIN_EMAIL = "system@hallofkvasir.org";

  const SYSTEM_EMAIL = "system@hallofkvasir.org";

}

/**
 * The cacher configuration class
 * @package HoK
 * @subpackage Config
 */
abstract class CONFIG_CACHE
{
  /**
   * The cache directory
   *
   */
  const DIR = ".";
  /**
   * The cache timeout
   *
   */
  const TIMEOUT = 3600;
}

require(KVF_INCLUDES."/configs/db.config.php");

/**
 * The mail handler configuration class
 * @package HoK
 * @subpackage Config
 */
abstract class CONFIG_MAILHANDLER
{
  /**
   * Whether or not to send mail
   *
   */
  const SEND_MAIL = true;
  /**
   * The from address
   *
   */
  const FROM_ADDR = "system@hallofkvasir.org";
  /**
   * The from name
   *
   */
  const FROM_NAME = "KvScheduler";
}

/**
 * The log handler configuration class
 * @package HoK
 * @subpackage Config
 */
abstract class CONFIG_LOGHANDLER
{
  /**
   * Holds the log types for the instances
   * @var array
   */
  public static $TYPES = array("requests" => "local", "sql" => "local", "maillog" => "local", "email" => "email");

  public static $CONFIGS = array(
    "n:requests" => array("LocalSetLogfileName" => "requests.log"),
    "n:sql" => array("LocalSetLogfileName" => "sql.log"),
    "n:maillog" => array("LocalSetLogfileName" => "mail.log"),
    "t:local" => array("EnableQueueMode" => null, "SetThresh" => DEBUG, "SetErrorConditionTriggerThresh" => KVF_LOG_LERROR, "SetErrorConditionThresh" => KVF_LOG_LDEBUG),
    "t:email" => array("EnableQueueMode" => null, "SetThresh" => KVF_LOG_LERROR, "SetErrorConditionTriggerThresh" => KVF_LOG_LALERT, "SetErrorConditionThresh" => KVF_LOG_LDEBUG)
  );

  public static $DEFAULT = "requests";

}

/**
 * Whether or not someone is logged in?  I actually forget what this actually does
 * @global boolean
 */
$_LOGGEDIN = false;

?>
